.\" Copyright 2008-2010 Vadim Zhukov <persgray@gmail.com>
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright notice,
.\"    this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright notice,
.\"    this list of conditions and the following disclaimer in the documentation
.\"    and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY AGAVA COMPANY ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
.\" EVENT SHALL THE AGAVA COMPANY OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
.\" INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
.\" (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
.\" ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\" The views and conclusions contained in the software and documentation are
.\" those of the authors and should not be interpreted as representing official
.\" policies, either expressed or implied, of the AGAVA Company.
.Dd $Mdocdate$
.Dt RB_DUMP 1
.Os AGAVA
.Sh NAME
.Nm rb_dump
.Nd retrieve backups from a remote host
.Sh SYNOPSIS
.Nm rb_dump
.Op Fl iNnv
.Op Fl d Ar directory
.Op Fl T Ar mintime
.Ar profile
.Ar host ...
.Sh DESCRIPTION
The
.Nm
utility retrieves archives using SSH connection to a
.Xr rb_agent 1
running on remote hosts.
What and how to dump is known from
.Ar profile ,
see
.Xr rb 5 .
.Pp
The options as follows:
.Bl -tag -width Ar
.It Fl d Ar directory
Overrides
.Cm archive_dir
profile option, which specifies directory where backups will reside.
.It Fl i
Forces
.Cm abort_if_exists
profile option to be disabled, i.e., existing archives will be overriden.
.It Fl m Ar modules
Comma-separated list of modules to check and rotate.
If not specified, rotating will be perfomed on all modules.
It's not an error to specify a module that do not exist in profile.
.It Fl N
Disables automatical backups rotating after dump.
Automatic rotates are proceeded via
.Xr rb_rotate 1
in parallel to next dump being made.
If
.Nm
is called from terminal, it'll wait for rotate process to complete before exit.
.It Fl n
Enables test mode, useful for debugging purposes.
Produces a lot of output, which isn't needed in normal operation.
Also, in test mode autorotate processes are not run in parallel with backing up
other hosts, to avoid messing up the output on a screen.
.It Fl T Ar mintime
Overrides
.Cm min_remote_time
profile option, which specifies pause made between attempts to connect to a
host.
In opposite to
.Cm min_remote_time ,
.Ar mintime
should be specified in seconds.
Value of 0 disables waiting.
Use with care, because
.Cm min_remote_time
was designed to avoid troubles with firewalls that blocks too
.Dq speedy
clients.
.It Fl v
Enables verbose mode, when
.Nm
will print detailed information what it is doing on stderr.
Same information always goes in log(s), but program output retains some
indentation, while in logs all leading whitespace is stripped.
.It Ar profile
Profile to use, mandatory.
Can be set either as absolute path or relative to
.Pa ~/.rb
directory (preferred).
.It Ar host ...
List of hosts to back up.
You should use the same name for
.Nm
as well as for other
.Xr rb 7
tools except
.Xr rb_cpanel 1 .
Using full-qualified DNS names (but without trailing dot) is recommended.
Hosts are dumped in the order given.
.El
.Pp
.Em NOTE :
.Fl v
doesn't imply
.Fl n
and vice versa.
Those options produce absolutely different output.
.Pp
.Ex -std rb_dump
.Sh EXAMPLES
Dump 3 cPanel-based hosts, quiet output (only serious errors will be shown):
.Pp
.Dl $ rb_dump cpanel cp101.agava.net cp106.agava.net cp19.agava.net
.Pp
Debug dumping of 2 other hosts when test only data being used:
.Dl $ rb_dump -inv cpanel cp201.agava.net cp202.agava.net
.Sh SEE ALSO
.Xr rb_agent 1 ,
.Xr rb_rotate 1 ,
.Xr ssh 1 ,
.Xr rb 5 ,
.Xr rb 7
.Sh AUTHORS
The
.Nm
manual page was written by
.An Vadim Zhukov Aq persgray@gmail.com .
.Sh HISTORY
An
.Nm
utility appeared in
.Nm RB
toolkit 1.0.
